package test.com.sitename.selenium.cases.jd.result;

import java.util.List;

import org.junit.Test;
import org.openqa.selenium.WebElement;

import test.com.sitename.selenium.base.SeleniumTestAbstract;
import test.com.sitename.selenium.cases.jd.pageutil.HomePage_Util;
import test.com.sitename.selenium.cases.jd.pageutil.ResultPage_Util;
import test.com.sitename.selenium.util.Selenium_Util;

public class QuickSearchTest_Selenium_1 extends SeleniumTestAbstract{

	@Test
	public void assert1212OnSales() {
		try{
			Selenium_Util.open("/");
			Selenium_Util.waitForElementsLoading(HomePage_Util.HOMEPAGE_BUTTON_SEARCH_RC , HomePage_Util.HOMEPAGE_INPUT_SEARCH_RC);
			Selenium_Util.type(HomePage_Util.HOMEPAGE_INPUT_SEARCH_RC, "12.12");
			Selenium_Util.click(HomePage_Util.HOMEPAGE_BUTTON_SEARCH_RC);
			Selenium_Util.waitForElementsLoading(ResultPage_Util.RESULTPAGE_SECTION_PRODUCTS_RC);
			Selenium_Util.assertTrue(Selenium_Util.isVisible(ResultPage_Util.RESULTPAGE_LINK_PRODUCTS_NAME_RC));
		}
		catch(Exception e){
			Selenium_Util.getScreenShot(e);
		}
	}
}
